// 引用网络请求中间件
import request from '../../utils/request.js';

export default {
	addList(data) {
		return request({
			url: `/FamilyAnaGeMent/addFamily`,
			method: 'POST',
			data
		})
	},
	/**
	 * @param {Object} userId
	 * @param {Object} xtUserFamily
	 */
	getone(userId,xtUserFamily) {
		return request({
			url: `/FamilyAnaGeMent/getone?userId=${userId}&xtUserFamily=${xtUserFamily}`,
			method: 'GET',
		})
	},
	/*  */
	getList() {
		return request({
			url: `/FamilyAnaGeMent/selectList`,
			method: 'GET',
		})
	},
	changeList(data) {
		console.log(data, "data");
		return request({
			url: `/FamilyAnaGeMent/updateFamily`,
			method: 'POST',
			data
		})
	},
	
	deleteList(userId, xtUserFamily) {
		return request({
			url: `/FamilyAnaGeMent/deleteFamily?userId=${userId}&xtUserFamily=${xtUserFamily}`,
			method: 'DELETE',
		})
	},

	getListOne(userId, xtUserFamily) {
		return request({
			url: `/FamilyAnaGeMent/deleteFamily?userId=${userId}&xtUserFamily=${xtUserFamily}`,
			method: 'GET',
		})
	},
	
	getUserInfo(){
		return request({
			url: `/FamilyAnaGeMent/userInfo`,
			method: 'GET',
		})
	},

}